﻿#region Copyright (C) Sector7 Software Studio. All rights reserved
/*******************************************************************************************
 * Creation
 *      Author:         Wolf Lai
 *      Date:           2012/3/12 18:58:38
 *      Version:        
 * Modification 
 *      Author: 
 *      Date: 
 *      Description: 
 *      Version:
 *******************************************************************************************/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sector7.Restaurant.EntityType;
using Sector7.Framework.Core;

namespace Sector7.Restaurant.DAO
{
    /// <summary>
    /// 元数据数据访问接口
    /// </summary>
    public interface IMetadataDAO
    {
        /// <summary>
        /// 创建元数据信息
        /// </summary>
        /// <param name="metaData">元数据信息</param>
        /// <returns></returns>
        int Create(RS_Metadata metadata);

        /// <summary>
        /// 获取所有元数据信息
        /// </summary>
        /// <param name="typeId">元数据类型编号</param>
        /// <returns></returns>
        List<RS_Metadata> ReadAll(int typeId);

        /// <summary>
        /// 获取指定拼音码所有元数据信息
        /// </summary>
        /// <param name="usage">使用范围</param>
        /// <returns></returns>
        List<RS_Metadata> ReadAllForUsage(int usage);

        /// <summary>
        /// 修改元数据信息
        /// </summary>
        /// <param name="metaData">元数据改变量</param>
        /// <returns></returns>
        int Update(EntityDelta delta);

        /// <summary>
        /// 删除元数据信息
        /// </summary>
        /// <param name="metaDataId">元数据编号</param>
        /// <returns></returns>
        DBOptResultType Delete(int metadataId);
    }
}
